package br.com.ss.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
 
@Entity
@Table(name = "Funcionario")
@PrimaryKeyJoinColumn(name = "id")
public class Funcionario extends Cliente implements Serializable{

	private static final long serialVersionUID = 5594320132092003617L;

	@Column(name = "cargo")
    private String cargo;
   
	@Column(name = "salario")
	private String salario;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="dataAdmissao")
	private Date dataAdmissao;    
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="dataDemissao")
	private Date dataDemissao;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="dataFerias")
	private Date dataFerias;
	
  //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-
 	

	public String getCargo() {
		return cargo;
	}



	public void setCargo(String cargo) {
		this.cargo = cargo;
	}



	public String getSalario() {
		return salario;
	}



	public void setSalario(String salario) {
		this.salario = salario;
	}



	public Date getDataAdmissao() {
		return dataAdmissao;
	}



	public void setDataAdmissao(Date dataAdmissao) {
		this.dataAdmissao = dataAdmissao;
	}



	public Date getDataDemissao() {
		return dataDemissao;
	}



	public void setDataDemissao(Date dataDemissao) {
		this.dataDemissao = dataDemissao;
	}



	public Date getDataFerias() {
		return dataFerias;
	}



	public void setDataFerias(Date dataFerias) {
		this.dataFerias = dataFerias;
	}
	
	
	@Override
	public String toString() {
		
		StringBuilder sb = new StringBuilder();
		
		sb.append(super.toString());
		
		sb.append(" [ ");
		sb.append(" Funcionario ");
		sb.append(" cargo = ").append(getCargo());
		sb.append(" salario = ").append(getSalario());
		sb.append(" dataAdmissao = ").append(getDataAdmissao());
		sb.append(" dataDemissao = ").append(getDataDemissao());
		sb.append(" dataFerias = ").append(getDataFerias());
		sb.append(" ] ");
		
		return sb.toString();
	}
	
	
}
